package com.asset.salesforce.service;

import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.SearchDaoImpl;
import com.asset.salesforce.domain.Account;
import com.asset.salesforce.domain.Contact;
import com.asset.salesforce.domain.Lead;
import com.asset.salesforce.domain.StockSku;

@Service
@Transactional(readOnly=false)
public class SearchService {
	
	@Autowired
	private SearchDaoImpl searchDaoImpl;
	
	public void index() {
		searchDaoImpl.index();
	}
	public Set<Lead> searchLead(String query) {
		return searchDaoImpl.searchLead(query);
	}
	public Set<Account> searchAccount(String query) {
		return searchDaoImpl.searchAccount(query);
	}
	public List<Contact> searchContact(String query) {
		return searchDaoImpl.searchContact(query);
	}
	public Set<StockSku> searchSku(String query) {
		return searchDaoImpl.searchSku(query);
	}

}
